package indi.zhifa.study2024.nbr.business.curd.storage.entity.po;

import com.baomidou.mybatisplus.annotation.TableName;
import indi.zhifa.core.mpenhance.entity.po.SysBaseEntity;
import indi.zhifa.study2024.nbr.enums.item.EItemUnitType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * <p>
 * 商品库存表
 * </p>
 *
 * @author 织法
 * @since 2024-09-19
 */
@Data
@TableName("item_inventory")
@Schema(title = "ItemInventoryEntity对象", description = "商品库存表")
public class ItemInventoryEntity extends SysBaseEntity {

    @Schema(title = "商品Id")
    private Long itemId;

    @Schema(title = "商品名")
    private String itemName;

    @Schema(title = "单位类型，不会变，冗余")
    private EItemUnitType unitType;

    @Schema(title = "小单位名称，不会变，冗余")
    private String smallUnitName;

    @Schema(title = "中单位名称，不会变，冗余")
    private String midUnitName;

    @Schema(title = "大单位名称，不会变，冗余")
    private String largeUnitName;

    @Schema(title = "一个大单位等于几个小单位，不会变，冗余")
    private Integer largeConvert;

    @Schema(title = "一个中单位等于几个小单位，不会变，冗余")
    private Integer midConvert;

    @Schema(title = "当前价格，小单位价格")
    private BigDecimal curPrice;

    @Schema(title = "当前大单位价格")
    private BigDecimal curPriceLarge;

    @Schema(title = "当前库存，小单位")
    private Long storage;


}
